// 部门消息模块
// 导入express框架
const express = require('express')
// 使用express框架的路由
const router = express.Router()
// 导入departmentMsg的路由处理模块
const departmentMsgHandler = require('../router_handle/department_msg')

// 更新并得到用户的未读列表read_list和read_status
router.post('/getReadList', departmentMsgHandler.getReadList)
// 得到消息列表(用户部门消息加全体部门消息)
router.post('/returnMessageBoxData', departmentMsgHandler.returnMessageBoxData)
// 得到单个用户的未读列表及状态
router.post('/getReadListAndStatus', departmentMsgHandler.getReadListAndStatus)
// 用户点击消息后，对未读列表read_list里的数据进行删减
router.post('/clickToRead', departmentMsgHandler.clickToRead)
// 把新发布的消息插入到对应部门用户的read_list中
router.post('/addReadList', departmentMsgHandler.addReadList)
// 把新删除的消息从对应部门用户的read_list中删减
router.post('/reduceReadList', departmentMsgHandler.reduceReadList)

module.exports = router